<template>
	<view class="pre-video" @click="closed">
		<view class="dialog"><video @click.stop="" :autoplay="true" :src="video" controls :show-background-playback-button="false"></video></view>
	</view>
</template>

<script>
export default {
	props: {
		video: String,
		show: Boolean
	},
	methods: {
		closed() {
			this.$emit('closed', false);
		}
	}
};
</script>

<style lang="scss" scoped>
	.pre-video{
		width: 100%;
		height: 100vh;
		position: fixed;
		top: 0;
	    left: 0;
		z-index: 300;
		background-color: rgba(0, 0, 0, 0.4);
		display: flex;
		align-items: center;
		justify-content: center;
		.dialog{  
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
</style>
